/****************************************************************************
 *
 *   Copyright (c) 2020-2021 PX4 Development Team. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 * 3. Neither the name PX4 nor the names of its contributors may be
 *    used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 ****************************************************************************/

#include <stdint.h>

static constexpr float SAMPLING_RES = 10;
static constexpr float SAMPLING_MIN_LAT = -90;
static constexpr float SAMPLING_MAX_LAT = 90;
static constexpr float SAMPLING_MIN_LON = -180;
static constexpr float SAMPLING_MAX_LON = 180;

static constexpr int LAT_DIM = 19;
static constexpr int LON_DIM = 37;


// *INDENT-OFF*
// Magnetic declination data in radians * 10^-4
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2022.0082,
static constexpr const int16_t declination_table[19][37] {
	//    LONGITUDE:   -180,  -170,  -160,  -150,  -140,  -130,  -120,  -110,  -100,   -90,   -80,   -70,   -60,   -50,   -40,   -30,   -20,   -10,     0,    10,    20,    30,    40,    50,    60,    70,    80,    90,   100,   110,   120,   130,   140,   150,   160,   170,   180,
	/* LAT: -90 */ {  26000, 24255, 22510, 20764, 19019, 17274, 15528, 13783, 12038, 10292,  8547,  6802,  5057,  3311,  1566,  -179, -1925, -3670, -5415, -7160, -8906,-10651,-12396,-14142,-15887,-17632,-19378,-21123,-22868,-24614,-26359,-28105,-29850, 31236, 29491, 27746, 26000, },
	/* LAT: -80 */ {  22568, 20435, 18493, 16718, 15076, 13537, 12073, 10661,  9285,  7935,  6603,  5284,  3975,  2670,  1363,    44, -1297, -2668, -4076, -5527, -7020, -8556,-10132,-11750,-13413,-15130,-16915,-18786,-20767,-22884,-25158,-27591,-30160, 30031, 27410, 24901, 22568, },
	/* LAT: -70 */ {  14972, 13575, 12450, 11491, 10624,  9794,  8954,  8067,  7116,  6097,  5027,  3933,  2847,  1791,   768,  -242, -1278, -2382, -3580, -4877, -6255, -7683, -9129,-10570,-11995,-13410,-14837,-16321,-17942,-19850,-22361,-26145, 30768, 24168, 19626, 16844, 14972, },
	/* LAT: -60 */ {   8399,  8158,  7881,  7611,  7361,  7111,  6805,  6375,  5762,  4944,  3945,  2833,  1712,   681,  -204,  -964, -1694, -2514, -3512, -4704, -6030, -7396, -8716, -9926,-10992,-11892,-12609,-13104,-13276,-12827,-10732, -3551,  4841,  7612,  8395,  8528,  8399, },
	/* LAT: -50 */ {   5468,  5507,  5454,  5368,  5297,  5263,  5230,  5106,  4765,  4105,  3098,  1827,   485,  -700, -1578, -2149, -2549, -2987, -3665, -4668, -5904, -7177, -8318, -9222, -9825,-10069, -9881, -9129, -7625, -5268, -2366,   381,  2490,  3914,  4788,  5263,  5468, },
	/* LAT: -40 */ {   3942,  4036,  4046,  4005,  3947,  3916,  3923,  3914,  3743,  3213,  2195,   756,  -809, -2129, -3001, -3461, -3651, -3714, -3877, -4432, -5396, -6468, -7355, -7899, -8014, -7645, -6763, -5382, -3669, -1963,  -501,   721,  1763,  2627,  3281,  3711,  3942, },
	/* LAT: -30 */ {   2973,  3060,  3093,  3082,  3027,  2951,  2892,  2860,  2735,  2262,  1233,  -280, -1889, -3150, -3899, -4252, -4339, -4138, -3706, -3470, -3816, -4557, -5258, -5616, -5499, -4920, -3965, -2758, -1545,  -596,    84,   684,  1307,  1907,  2414,  2775,  2973, },
	/* LAT: -20 */ {   2330,  2377,  2398,  2404,  2365,  2274,  2168,  2093,  1949,  1458,   409, -1074, -2555, -3624, -4167, -4293, -4098, -3549, -2691, -1885, -1593, -1937, -2586, -3061, -3104, -2751, -2118, -1300,  -520,   -27,   238,   540,   979,  1454,  1874,  2179,  2330, },
	/* LAT: -10 */ {   1937,  1932,  1914,  1915,  1890,  1809,  1702,  1613,  1430,   883,  -172, -1546, -2823, -3662, -3941, -3724, -3155, -2377, -1531,  -772,  -299,  -322,  -787, -1295, -1513, -1427, -1115,  -615,  -115,   130,   181,   342,   711,  1145,  1535,  1819,  1937, },
	/* LAT:   0 */ {   1724,  1691,  1639,  1634,  1626,  1561,  1460,  1349,  1097,   479,  -558, -1784, -2843, -3439, -3450, -2959, -2195, -1413,  -758,  -219,   197,   315,    42,  -375,  -633,  -690,  -592,  -329,   -37,    55,    -3,    87,   425,   864,  1280,  1597,  1724, },
	/* LAT:  10 */ {   1590,  1598,  1559,  1578,  1607,  1562,  1444,  1261,   887,   171,  -848, -1926, -2759, -3108, -2914, -2315, -1540,  -826,  -307,    76,   403,   555,   398,    76,  -160,  -268,  -291,  -208,  -102,  -141,  -278,  -251,    48,   499,   976,  1381,  1590, },
	/* LAT:  20 */ {   1409,  1558,  1621,  1715,  1804,  1787,  1636,  1337,   794,   -62, -1105, -2060, -2664, -2782, -2462, -1864, -1154,  -502,   -39,   273,   533,   682,   594,   352,   151,    33,   -56,  -119,  -197,  -385,  -620,  -679,  -447,    -2,   536,  1053,  1409, },
	/* LAT:  30 */ {   1112,  1479,  1740,  1965,  2127,  2139,  1955,  1535,   809,  -220, -1340, -2223, -2646, -2591, -2197, -1620,  -965,  -345,   120,   428,   661,   810,   793,   645,   494,   370,   216,     8,  -273,  -646, -1014, -1174, -1017,  -593,   -18,   591,  1112, },
	/* LAT:  40 */ {    760,  1347,  1841,  2233,  2483,  2528,  2314,  1783,   873,  -356, -1600, -2474, -2803, -2656, -2212, -1621,  -968,  -337,   175,   543,   815,  1016,  1113,  1104,  1027,   880,   614,   207,  -328,  -933, -1456, -1702, -1588, -1173,  -574,    99,   760, },
	/* LAT:  50 */ {    475,  1224,  1904,  2461,  2827,  2933,  2704,  2051,   908,  -594, -2024, -2947, -3247, -3058, -2570, -1924, -1213,  -514,   104,   613,  1034,  1391,  1674,  1847,  1868,  1683,  1242,   539,  -351, -1253, -1935, -2226, -2103, -1662, -1026,  -291,   475, },
	/* LAT:  60 */ {    288,  1142,  1948,  2642,  3145,  3356,  3140,  2326,   805, -1166, -2893, -3880, -4135, -3875, -3301, -2555, -1727,  -884,   -74,   680,  1375,  2008,  2553,  2952,  3116,  2934,  2303,  1194,  -216, -1539, -2413, -2726, -2563, -2067, -1370,  -565,   288, },
	/* LAT:  70 */ {     69,  1008,  1906,  2705,  3318,  3609,  3351,  2204,   -60, -2799, -4760, -5583, -5587, -5099, -4324, -3386, -2358, -1289,  -211,   851,  1879,  2847,  3718,  4428,  4880,  4919,  4321,  2862,   678, -1431, -2735, -3183, -3024, -2490, -1736,  -862,    69, },
	/* LAT:  80 */ {   -584,   340,  1195,  1888,  2272,  2078,   846, -1840, -5119, -7245, -7976, -7827, -7184, -6256, -5157, -3952, -2681, -1371,   -43,  1288,  2604,  3888,  5116,  6255,  7253,  8014,  8361,  7928,  6040,  2336, -1234, -2965, -3346, -3027, -2355, -1507,  -584, },
	/* LAT:  90 */ { -30042,-28297,-26551,-24806,-23060,-21315,-19570,-17824,-16079,-14334,-12588,-10843, -9098, -7353, -5608, -3863, -2117,  -372,  1373,  3118,  4863,  6609,  8354, 10099, 11844, 13590, 15335, 17081, 18826, 20571, 22317, 24062, 25808, 27553, 29299, 31044,-30042, },
};

// Magnetic inclination data in radians * 10^-4
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2022.0082,
static constexpr const int16_t inclination_table[19][37] {
	//    LONGITUDE:   -180,  -170,  -160,  -150,  -140,  -130,  -120,  -110,  -100,   -90,   -80,   -70,   -60,   -50,   -40,   -30,   -20,   -10,     0,    10,    20,    30,    40,    50,    60,    70,    80,    90,   100,   110,   120,   130,   140,   150,   160,   170,   180,
	/* LAT: -90 */ { -12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575, },
	/* LAT: -80 */ { -13661,-13527,-13366,-13186,-12992,-12790,-12586,-12385,-12194,-12018,-11861,-11726,-11616,-11530,-11466,-11425,-11405,-11408,-11435,-11489,-11573,-11687,-11831,-12005,-12203,-12420,-12649,-12882,-13109,-13322,-13509,-13659,-13764,-13816,-13813,-13759,-13661, },
	/* LAT: -70 */ { -14110,-13791,-13472,-13149,-12817,-12472,-12117,-11759,-11415,-11106,-10852,-10668,-10555,-10502,-10489,-10493,-10501,-10511,-10535,-10591,-10699,-10873,-11118,-11432,-11803,-12220,-12668,-13132,-13598,-14051,-14469,-14815,-15006,-14954,-14723,-14426,-14110, },
	/* LAT: -60 */ { -13521,-13168,-12830,-12497,-12154,-11781,-11366,-10911,-10443,-10011, -9680, -9502, -9497, -9633, -9837,-10031,-10159,-10206,-10195,-10182,-10228,-10385,-10672,-11078,-11575,-12130,-12715,-13311,-13900,-14461,-14958,-15248,-15075,-14692,-14286,-13893,-13521, },
	/* LAT: -50 */ { -12497,-12156,-11825,-11503,-11180,-10833,-10434, -9962, -9432, -8909, -8516, -8387, -8584, -9042, -9607,-10121,-10485,-10653,-10628,-10479,-10337,-10339,-10556,-10968,-11508,-12099,-12686,-13225,-13673,-13971,-14080,-14007,-13804,-13521,-13193,-12846,-12497, },
	/* LAT: -40 */ { -11240,-10893,-10547,-10202, -9862, -9524, -9162, -8736, -8215, -7648, -7218, -7170, -7623, -8444, -9366,-10198,-10861,-11301,-11449,-11289,-10949,-10674,-10661,-10937,-11396,-11901,-12348,-12672,-12833,-12839,-12749,-12611,-12431,-12199,-11913,-11585,-11240, },
	/* LAT: -30 */ {  -9601, -9225, -8848, -8458, -8066, -7690, -7332, -6940, -6426, -5814, -5357, -5431, -6190, -7388, -8640, -9738,-10656,-11372,-11779,-11779,-11414,-10906,-10568,-10563,-10811,-11132,-11391,-11507,-11446,-11270,-11095,-10959,-10811,-10604,-10322, -9978, -9601, },
	/* LAT: -20 */ {  -7370, -6934, -6520, -6093, -5649, -5218, -4825, -4410, -3842, -3155, -2702, -2950, -4049, -5655, -7285, -8660, -9732,-10514,-10960,-11003,-10646,-10036, -9476, -9227, -9273, -9435, -9577, -9597, -9426, -9154, -8958, -8869, -8762, -8553, -8237, -7826, -7370, },
	/* LAT: -10 */ {  -4414, -3883, -3434, -2999, -2542, -2091, -1675, -1217,  -587,   119,   488,    73, -1243, -3154, -5131, -6748, -7854, -8495, -8767, -8710, -8307, -7627, -6963, -6614, -6573, -6665, -6784, -6809, -6622, -6326, -6169, -6174, -6130, -5912, -5528, -5003, -4414, },
	/* LAT:   0 */ {   -905,  -288,   172,   572,   990,  1407,  1799,  2247,  2836,  3418,  3627,  3141,  1857,   -46, -2091, -3750, -4770, -5207, -5271, -5104, -4669, -3958, -3253, -2879, -2818, -2888, -3014, -3089, -2959, -2723, -2666, -2804, -2861, -2672, -2248, -1621,  -905, },
	/* LAT:  10 */ {   2563,  3183,  3613,  3951,  4306,  4673,  5027,  5418,  5875,  6249,  6290,  5809,  4736,  3176,  1485,   103,  -711,  -966,  -879,  -647,  -239,   395,  1028,  1367,  1429,  1383,  1281,  1190,  1233,  1338,  1265,  1004,   817,   892,  1244,  1844,  2563, },
	/* LAT:  20 */ {   5417,  5941,  6317,  6611,  6924,  7268,  7612,  7963,  8301,  8504,  8421,  7963,  7133,  6041,  4915,  4002,  3467,  3342,  3488,  3730,  4058,  4521,  4980,  5236,  5292,  5272,  5223,  5166,  5156,  5139,  4968,  4639,  4346,  4258,  4430,  4850,  5417, },
	/* LAT:  30 */ {   7569,  7940,  8256,  8537,  8846,  9194,  9553,  9896, 10176, 10293, 10151,  9733,  9106,  8396,  7734,  7221,  6926,  6880,  7020,  7229,  7474,  7772,  8060,  8234,  8290,  8301,  8302,  8293,  8272,  8191,  7972,  7621,  7269,  7050,  7033,  7227,  7569, },
	/* LAT:  40 */ {   9266,  9486,  9741, 10027, 10353, 10715, 11084, 11425, 11679, 11763, 11616, 11257, 10785, 10311,  9914,  9629,  9478,  9472,  9580,  9740,  9914, 10097, 10269, 10394, 10471, 10530, 10584, 10617, 10602, 10493, 10253,  9905,  9539,  9255,  9112,  9124,  9266, },
	/* LAT:  50 */ {  10801, 10923, 11125, 11395, 11718, 12073, 12429, 12746, 12970, 13030, 12892, 12595, 12230, 11884, 11608, 11420, 11325, 11320, 11385, 11487, 11600, 11715, 11831, 11946, 12064, 12185, 12298, 12371, 12363, 12240, 11995, 11668, 11329, 11044, 10855, 10775, 10801, },
	/* LAT:  60 */ {  12319, 12392, 12544, 12763, 13034, 13335, 13638, 13905, 14082, 14110, 13974, 13724, 13435, 13163, 12941, 12784, 12692, 12660, 12675, 12721, 12789, 12873, 12978, 13110, 13268, 13443, 13608, 13718, 13725, 13607, 13383, 13105, 12826, 12588, 12418, 12327, 12319, },
	/* LAT:  70 */ {  13758, 13802, 13898, 14041, 14222, 14426, 14635, 14817, 14922, 14901, 14762, 14560, 14341, 14137, 13963, 13828, 13733, 13678, 13658, 13670, 13712, 13783, 13886, 14022, 14188, 14375, 14559, 14700, 14748, 14677, 14516, 14318, 14123, 13958, 13838, 13770, 13758, },
	/* LAT:  80 */ {  15000, 15013, 15051, 15112, 15189, 15275, 15354, 15399, 15380, 15299, 15185, 15060, 14937, 14822, 14723, 14640, 14578, 14537, 14518, 14522, 14548, 14597, 14668, 14760, 14872, 14998, 15133, 15265, 15372, 15417, 15380, 15295, 15200, 15116, 15052, 15013, 15000, },
	/* LAT:  90 */ {  15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, 15394, },
};

// Magnetic strength data in milli-Gauss * 10
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2022.0082,
static constexpr const int16_t strength_table[19][37] {
	//    LONGITUDE:  -180, -170, -160, -150, -140, -130, -120, -110, -100,  -90,  -80,  -70,  -60,  -50,  -40,  -30,  -20,  -10,    0,   10,   20,   30,   40,   50,   60,   70,   80,   90,  100,  110,  120,  130,  140,  150,  160,  170,  180,
	/* LAT: -90 */ {  5455, 5455, 5455, 5455, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5454, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, },
	/* LAT: -80 */ {  6061, 5998, 5919, 5827, 5725, 5613, 5495, 5374, 5251, 5131, 5017, 4912, 4818, 4738, 4675, 4630, 4605, 4603, 4624, 4670, 4740, 4833, 4948, 5079, 5223, 5372, 5522, 5665, 5796, 5910, 6003, 6072, 6116, 6136, 6132, 6107, 6061, },
	/* LAT: -70 */ {  6305, 6173, 6023, 5859, 5681, 5489, 5284, 5069, 4850, 4634, 4432, 4249, 4091, 3960, 3855, 3778, 3731, 3718, 3746, 3822, 3949, 4129, 4357, 4624, 4918, 5225, 5529, 5813, 6063, 6267, 6418, 6514, 6556, 6549, 6500, 6416, 6305, },
	/* LAT: -60 */ {  6190, 5999, 5798, 5590, 5372, 5137, 4881, 4603, 4310, 4020, 3753, 3525, 3345, 3210, 3111, 3038, 2987, 2967, 2992, 3082, 3249, 3500, 3825, 4210, 4632, 5066, 5487, 5872, 6197, 6446, 6610, 6689, 6691, 6629, 6516, 6366, 6190, },
	/* LAT: -50 */ {  5847, 5618, 5386, 5156, 4924, 4680, 4409, 4106, 3778, 3446, 3143, 2902, 2740, 2648, 2600, 2566, 2533, 2507, 2512, 2583, 2755, 3043, 3437, 3907, 4414, 4920, 5395, 5814, 6154, 6396, 6535, 6576, 6534, 6425, 6263, 6066, 5847, },
	/* LAT: -40 */ {  5395, 5150, 4906, 4667, 4433, 4196, 3942, 3658, 3344, 3018, 2719, 2495, 2377, 2351, 2370, 2392, 2397, 2386, 2374, 2402, 2530, 2802, 3217, 3730, 4276, 4801, 5269, 5658, 5951, 6139, 6228, 6231, 6162, 6032, 5851, 5633, 5395, },
	/* LAT: -30 */ {  4880, 4640, 4401, 4167, 3941, 3723, 3504, 3273, 3018, 2742, 2484, 2301, 2230, 2253, 2320, 2392, 2458, 2509, 2533, 2545, 2611, 2806, 3164, 3650, 4181, 4679, 5099, 5417, 5621, 5721, 5748, 5722, 5643, 5511, 5332, 5116, 4880, },
	/* LAT: -20 */ {  4322, 4110, 3902, 3698, 3502, 3319, 3151, 2988, 2811, 2613, 2422, 2287, 2245, 2286, 2375, 2486, 2614, 2743, 2834, 2871, 2896, 2989, 3225, 3606, 4055, 4482, 4832, 5069, 5176, 5184, 5154, 5107, 5024, 4897, 4731, 4534, 4322, },
	/* LAT: -10 */ {  3790, 3631, 3478, 3332, 3197, 3077, 2974, 2882, 2786, 2672, 2550, 2450, 2403, 2425, 2510, 2638, 2794, 2953, 3079, 3143, 3158, 3183, 3304, 3553, 3877, 4199, 4465, 4630, 4666, 4615, 4547, 4483, 4394, 4269, 4121, 3957, 3790, },
	/* LAT:   0 */ {  3412, 3320, 3237, 3164, 3109, 3071, 3045, 3027, 3004, 2957, 2878, 2784, 2702, 2668, 2708, 2810, 2942, 3078, 3194, 3270, 3302, 3323, 3396, 3552, 3760, 3973, 4153, 4260, 4267, 4201, 4113, 4020, 3908, 3777, 3643, 3519, 3412, },
	/* LAT:  10 */ {  3283, 3252, 3232, 3229, 3254, 3302, 3358, 3413, 3449, 3440, 3371, 3256, 3129, 3032, 3003, 3043, 3123, 3222, 3322, 3407, 3471, 3533, 3620, 3738, 3872, 4010, 4129, 4200, 4203, 4142, 4033, 3890, 3729, 3569, 3434, 3338, 3283, },
	/* LAT:  20 */ {  3400, 3403, 3430, 3485, 3577, 3699, 3829, 3947, 4029, 4041, 3968, 3826, 3658, 3517, 3439, 3425, 3459, 3531, 3627, 3724, 3815, 3912, 4023, 4134, 4242, 4353, 4454, 4521, 4532, 4475, 4338, 4137, 3910, 3701, 3538, 3438, 3400, },
	/* LAT:  30 */ {  3723, 3731, 3786, 3887, 4030, 4202, 4379, 4536, 4644, 4671, 4598, 4443, 4253, 4086, 3979, 3932, 3934, 3984, 4070, 4167, 4264, 4369, 4485, 4603, 4722, 4848, 4968, 5055, 5082, 5025, 4870, 4631, 4357, 4103, 3904, 3777, 3723, },
	/* LAT:  40 */ {  4222, 4222, 4288, 4413, 4581, 4769, 4953, 5110, 5215, 5240, 5172, 5023, 4835, 4659, 4529, 4453, 4426, 4446, 4506, 4585, 4670, 4767, 4882, 5015, 5166, 5327, 5478, 5588, 5628, 5575, 5421, 5183, 4909, 4650, 4440, 4295, 4222, },
	/* LAT:  50 */ {  4832, 4826, 4883, 4995, 5142, 5302, 5452, 5573, 5646, 5655, 5591, 5463, 5300, 5135, 4996, 4898, 4842, 4830, 4853, 4903, 4971, 5062, 5180, 5330, 5505, 5690, 5856, 5975, 6020, 5977, 5847, 5651, 5426, 5210, 5030, 4901, 4832, },
	/* LAT:  60 */ {  5392, 5381, 5411, 5475, 5562, 5656, 5743, 5809, 5841, 5832, 5777, 5682, 5561, 5432, 5312, 5215, 5148, 5113, 5111, 5138, 5194, 5280, 5397, 5544, 5711, 5879, 6027, 6132, 6177, 6155, 6073, 5946, 5800, 5656, 5534, 5444, 5392, },
	/* LAT:  70 */ {  5726, 5707, 5706, 5718, 5741, 5767, 5791, 5805, 5804, 5784, 5744, 5686, 5615, 5539, 5465, 5400, 5352, 5323, 5318, 5338, 5382, 5452, 5543, 5652, 5769, 5883, 5983, 6056, 6096, 6100, 6071, 6017, 5950, 5879, 5815, 5762, 5726, },
	/* LAT:  80 */ {  5789, 5772, 5758, 5746, 5736, 5727, 5717, 5705, 5690, 5672, 5649, 5623, 5596, 5569, 5544, 5523, 5509, 5504, 5508, 5523, 5549, 5584, 5627, 5675, 5724, 5772, 5815, 5850, 5874, 5887, 5890, 5883, 5869, 5850, 5829, 5808, 5789, },
	/* LAT:  90 */ {  5681, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5681, 5681, 5681, 5681, 5681, 5681, 5681, },
};
